package com.realone.packman.codec.encoder;

import com.realone.packman.codec.encoder.vo.BmsEncoderDataVo08;

import java.nio.ByteBuffer;

/**
 * 设置BMS系统参数 编码
 *
 * @author hugx
 * @create 2018-09-14 15:57
 */
public class BmsEncoder08 extends BmsEncoder<BmsEncoderDataVo08> {

    @Override
    protected byte[] encoderData(BmsEncoderDataVo08 bmsEncoderDataVo08) {
        ByteBuffer bb = ByteBuffer.allocate(3);
        bb.put(bmsEncoderDataVo08.getHighTemperatureThreshold());
        bb.put(bmsEncoderDataVo08.getLowTemperatureThreshold());
        bb.put(bmsEncoderDataVo08.getHighHumidityThreshold());

        return bb.array();
    }
}
